Function: cvs-fileinfo<

cvs-fileinfo< is a byte-compiled function defined in pcvs-info.el.gz.

Signature

(cvs-fileinfo< A B)

Documentation

Compare fileinfo A with fileinfo B and return t if A is less.

The ordering defined by this function is such that directories are sorted alphabetically, and inside every directory the DIRCHANGE fileinfo will appear first, followed by all files (alphabetically).

Source Code

;; Defined in /usr/src/emacs/lisp/vc/pcvs-info.el.gz
(defun cvs-fileinfo< (a b)
  "Compare fileinfo A with fileinfo B and return t if A is `less'.
The ordering defined by this function is such that directories are
sorted alphabetically, and inside every directory the DIRCHANGE
fileinfo will appear first, followed by all files (alphabetically)."
  (let (  ;; (subtypea (cvs-fileinfo->subtype a))
	) ;; (subtypeb (cvs-fileinfo->subtype b))
    (cond
     ;; Sort according to directories.
     ((string< (cvs-fileinfo->dir a) (cvs-fileinfo->dir b)) t)
     ((not (string= (cvs-fileinfo->dir a) (cvs-fileinfo->dir b))) nil)

     ;; The DIRCHANGE entry is always first within the directory.
     ((eq (cvs-fileinfo->type b) 'DIRCHANGE) nil)
     ((eq (cvs-fileinfo->type a) 'DIRCHANGE) t)

     ;; All files are sorted by file name.
     ((string< (cvs-fileinfo->file a) (cvs-fileinfo->file b))))))